//
//  NSTimer+Block.h
//  bottleMessage
//
//  Created by mazm on 14-12-19.
//  Copyright (c) 2014年 SnailGame.com. All rights reserved.
//

#import <UIKit/UIKit.h>


@class NSTimerBlock;
//scheduledTimerWithTimeInterval
typedef void(^scheduledBlock) (NSTimerBlock* aTimer);

@interface NSTimerBlock :NSObject

@property (nonatomic,copy) scheduledBlock schBlock;
/**最后一次定时函数*/
@property (nonatomic,copy) void (^lastScheduledBlock)();
@property (nonatomic,assign) int timeCounts;

@property (nonatomic,assign) NSTimeInterval timeInterval;


-(void) fire;

/***/
-(void) invalidate;

//+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti target:(id)aTarget selector:(SEL)aSelector userInfo:(id)userInfo repeats:(BOOL)yesOrNo;
// 用Block的方式回调，这时候会默认用self作为Delegate
+ (NSTimerBlock *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti scheduledBlock:(scheduledBlock) block;


@end
